<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Index extends Api
{

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     * 
     */
    public function index()
    {
        $this->success('请求成功');
    }

    

    public function test(){
//        $wx = new \wechat\Wx();
//        $res = $wx->getAccessToken();
//        $this->success('',$res);
//        $data = $this->request->post();
//        $this->success('',$data);
        $redis = new \Predis\Client(\think\Config::get('redis'));
        $redis->set('foo1','bara1');
        echo $redis->get('foo1');

    }

}
